<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>出行人信息</title>
    <link rel="stylesheet" href="../../../css/iconfont/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="../../../css/aui.css" />
    <link rel="stylesheet" href="../../../css/index/train/update_passenger.css" />
    <link rel="stylesheet" href="../../../script/widget/mobiscroll/mobiscroll.custom-3.0.0-beta6.min.css" />
    <link rel="stylesheet" href="../../../css/my/apply.css" />
</head>

<body style="cursor: pointer">
    <!--头部start-->
    <header class="aui-bar aui-bar-nav" style="background: #3CB0D6;" id='header'>
        <a class="aui-pull-left aui-btn" onclick="closeWin()">
            <span class="aui-iconfont aui-icon-left"></span>
        </a>
        <div class="aui-title">出行人信息</div>
        <div class="title-right" onclick="update_submit()" style="float:right;margin-right: 1rem;font-size: 0.8rem;">完成</div>
    </header>
    <ul class="aui-list aui-form-list">
        <li style="height:1.5rem;line-height:1.5rem;color:#BBBABC;font-size:0.6rem;padding-left:0.75rem;font-weight:bold;">基本信息</li>
        <li class="aui-list-item aui-margin-t-15" style="margin-top:0rem!important;">
            <div class="aui-list-item-inner">
                <div class="aui-text font-size-7 grey-8">真实姓名</div>
                <div class="aui-list-item-input">
                    <input class="font-size-7 uName" style='text-align:right;' type="text" disabled="disabled" placeholder="不超过10个汉字或20个英文字符" value="杨毅" />
                </div>
                <!-- <div class="aui-list-item-label-icon" onclick="explain()"><i class="aui-iconfont aui-icon-question" style="color:#ffbb43"></i></div> -->
            </div>
        </li>
        <li class="aui-list-item aui-margin-t-15" style="margin-top:0rem!important;">
            <div class="aui-list-item-inner">
                <div class="aui-text font-size-7 grey-8">手机号码</div>
                <div class="aui-list-item-input">
                    <input class="font-size-7 uMobile" style='text-align:right;' disabled="disabled" type="text" placeholder="请输入手机号码" value="15516001648" />
                </div>
            </div>
        </li>
        <li style="height:1.5rem;line-height:1.5rem;color:#BBBABC;font-size:0.6rem;padding-left:0.75rem;font-weight:bold;">短信信息</li>
        <li class="aui-list-item aui-margin-t-15" style="margin-top:0rem!important;">
            <div class="aui-list-item-inner">
                <div class="aui-text font-size-7 grey-8">发送预定短信</div>
                <div class="aui-list-item-input" style="float: right;display: inline-block;width: 20%;">
                    <input type="checkbox" class="aui-switch sendMsg" name="smsCheck" checked="checked">
                </div>
            </div>
        </li>
        <li style="height:1.5rem;line-height:1.5rem;color:#BBBABC;font-size:0.6rem;padding-left:0.75rem;font-weight:bold;">证件信息</li>
        <li class="aui-list-item aui-margin-t-15" id='cards_id' style="margin-top:0rem!important;padding:0.5rem 0;">
            <!-- <div class="aui-list-item-inner">
                <div class="aui-text font-size-7 grey-8" style="width:auto;padding-left:0.75rem;">
                    <p style="font-weight:bold;">二代身份证</p>
                    <p>142723199323120555</p>
                </div>
                <label style="color:#A9A9A9;float:right;padding-right:0.75rem;">
                  <input class="aui-radio order_radio" type="radio" name="cards"  value="2">
                </label>
            </div> -->
        </li>
    </ul>
</body>
<script type="text/javascript" src="../../../script/aui/api.js"></script>
<script type="text/javascript" src="../../../script/extend/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="../../../script/aui/aui-dialog.js"></script>
<script type="text/javascript" src="../../../script/common.js"></script>
<script type="text/javascript" src="../../../script/aui/aui-toast.js"></script>
<script type="text/javascript" src="../../../script/widget/mobiscroll/mobiscroll.custom-3.0.0-beta6.min.js"></script>
<script type="text/javascript" src="../../../script/config.js"></script>
<script src="../../../script/extend/doT.min.js"></script>
<script type="text/template" charset="utf-8" id="usercard_id">
    {{ for(var j=0;j<it.length;j++){ }}
    {{ if (it[j].card_number !='') { }}
    <div class="aui-list-item-inner">
        <div class="aui-text font-size-7 grey-8" style="width:auto;padding-left:0.75rem;">
            <p class='card_nm' style="font-weight:bold;">{{=it[j].card_name}}</p>
            <p class='card_nb'>{{=it[j].card_number}}</p>
        </div>
        <label style="color:#A9A9A9;float:right;padding-right:0.75rem;">
        <input class="aui-radio order_radio" type="radio" name="cards"  value="{{=it[j].card_id}}">
      </label>
        </div>
      {{ } }}
    {{ } }}
</script>
<script>
    var u_type, u_id, u_index,u_name,u_moble;
    apiready = function() {
        api.parseTapmode();
        //设置高度
        var header = $api.byId('header');
        $api.fixStatusBar(header);
        uType = api.pageParam.u_type;
        uId = api.pageParam.u_id;
        u_index = api.pageParam.u_index;
        u_name = api.pageParam.user_name;
        u_moble = api.pageParam.user_moble;
        $('.uName').val(u_name);
        $('.uMobile').val(u_moble);
        var staffIds = '';
        var noStaffIds = '';
        if (uType == 1) {
            staffIds = uId;
        } else {
            noStaffIds = uId;
        }

        var param = {};
        setTimeout(function(){
            $showMask("加载中");
            param.url = Config.common.getTravelUser;
            param.data = {
                staffIds: staffIds,
                noStaffIds: noStaffIds
            };
            ajax(param, function(data) {
                    if (data.code == 1) {
                            var evalText = doT.template($('#usercard_id').text());
                            $('#cards_id').html(evalText(data.data[0].cardList));
                            // //初始默认选择身份证
                            $("input[name=cards]:eq(0)").attr("checked",'checked');
                    }
                });
                //判断发送短信按钮
            var smsif = $api.getStorage('send_sms');

            if (smsif == 0) {
                $('.sendMsg').removeAttr('checked');
            } else {
                $('.sendMsg').attr('checked', true);
            }
        },500)


    };

    //  完成提交
    var u_index = 0;
    function update_submit() {
      if ($("input[type='checkbox']").is(':checked') == true) {
        issend = 1;
      } else {
        issend = 0;
      }
      api.sendEvent({
          name: 'selectCard',
          extra: {
              card_id     : $("input[name='cards']:checked").val(),
              card_name   : $("input[name='cards']:checked").parent().parent().find('.card_nm').text(),
              card_number : $("input[name='cards']:checked").parent().parent().find('.card_nb').text(),
              issend      : issend
          }
      });
      setTimeout(function() {
          api.closeWin();
      }, 500);
    }

    function order_details() {
        openWin('order_details','./order_details.html');
    }

    function explain() {
        var dialog = new auiDialog({});
        var msg = "1.请优先使用中文姓名。<br/>2.请优先使用中文姓名。<br/>3.请优先使用中文姓名。<br/>4.请优先使用中文姓名。<br/>1.请优先使用中文姓名。<br/>2.请优先使用中文姓名。<br/>3.请优先使用中文姓名。<br/>4.请优先使用中文姓名。<br/>1.请优先使用中文姓名。<br/>2.请优先使用中文姓名。<br/>3.请优先使用中文姓名。<br/>4.请优先使用中文姓名。<br/>";
        dialog.alert({
            title: "姓名填写说明1",
            msg: msg
        }, function(ret) {

        })
    }

    $('#scroller').mobiscroll().date({
        theme: 'mobiscroll',
        lang: 'zh',
        dateFormat: 'yyyy-mm-dd',
        display: 'center',
        mode: 'Basic usage date'

    });
</script>

</html>
